package cn.powerone.scm.domain;

import java.math.BigDecimal;
import java.util.List;

import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import cn.powerone.common.annotation.Excel;
import cn.powerone.common.core.domain.BaseEntity;

/**
 * 产品对象 scm_products
 *
 * @author PowerOne
 * @date 2025-06-27
 */
@Setter
@Getter
public class ScmProducts extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    private Long id;

    /**
     * 图号
     */
    @Excel(name = "图号")
    private String drawingNumber;

    /**
     * 版本号
     */
    @Excel(name = "版本号")
    private String version;

    /**
     * 内部版本号
     */
    @Excel(name = "内部版本号")
    private Long internalVersion;

    /**
     * 产品名称
     */
    @Excel(name = "品名")
    private String productName;

    /**
     * 产品状态
     */
    @Excel(name = "产品状态", dictType = "scm_product_status")
    private Long productStatus;

    /** 材质 */
    @Excel(name = "材质")
    private String material;

    /** 阻燃等级 */
    @Excel(name = "阻燃等级")
    private String inflamingRetardingLevel;

    /** 规格 */
    @Excel(name = "规格")
    private String specification;

    /**
     * 型号
     */
    @Excel(name = "型号")
    private String model;

    /**
     * 颜色
     */
    @Excel(name = "颜色")
    private String color;

    /**
     * 图纸构成
     */
    @Excel(name = "图纸构成")
    private String drawingComposition;

    /**
     * 上传总图纸名字
     */
    @Excel(name = "图纸名字")
    private String drawingAttachmentName;

    /**
     * 上传总图纸地址
     */
    @Excel(name = "图纸地址")
    private String drawingAttachmentUrl;

    /** 量产单位 */
    @Excel(name = "量产单位")
    private String massUnit;

    /** 量产单位单价 */
    @Excel(name = "量产单价")
    private BigDecimal massUnitPrice;

    /**
     * 父级ID
     */
    private Long parentId;

    /**
     * 产品备注
     */
    @Excel(name = "产品备注")
    private String productRemark;

    /**
     * 产品子表信息
     */
    private List<ScmProductsSub> scmProductsSubList;



    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("drawingNumber", getDrawingNumber())
                .append("version", getVersion())
                .append("internalVersion", getInternalVersion())
                .append("productName", getProductName())
                .append("productStatus", getProductStatus())
                .append("material", getMaterial())
                .append("inflamingRetardingLevel", getInflamingRetardingLevel())
                .append("specification", getSpecification())
                .append("model", getModel())
                .append("color", getColor())
                .append("drawingComposition", getDrawingComposition())
                .append("drawingAttachmentName", getDrawingAttachmentName())
                .append("drawingAttachmentUrl", getDrawingAttachmentUrl())
                .append("massUnit", getMassUnit())
                .append("massUnitPrice", getMassUnitPrice())
                .append("parentId", getParentId())
                .append("productRemark", getProductRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("scmProductsSubList", getScmProductsSubList())
                .toString();
    }

}
